package ipad.asia.service.impl;

import ipad.asia.dao.AdminDao;
import ipad.asia.entity.Admin;
import ipad.asia.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminDao adminDao;
    @Override
    public Admin findByUserAndPassword(String user, String password) {
        return adminDao.findByUserAndPassword(user, password);
    }

    @Override
    public Admin findById(int id) {
        return adminDao.findById(id);
    }

    @Override
    public List<Admin> findByUser(String user) {
        return adminDao.findByUser(user);
    }

    @Override
    public void save(Admin admin) {
        adminDao.save(admin);
    }
}
